# Contributor: Paul Kilar <pkilar@gmail.com>
# Maintainer: Paul Kilar <pkilar@gmail.com>
pkgname=py3-bottle
_pkgname=bottle
pkgver=0.12.21
pkgrel=0
pkgdesc="fast, simple and lightweight WSGI micro web-framework"
options="!check" # failures=1
url="https://bottlepy.org/docs/dev"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

# secfixes:
#   0.12.21-r0:
#     - CVE-2022-31799

replaces="py-bottle" # Backwards compatibility
provides="py-bottle=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 test/testall.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
3d621f6684f439a4a5718ad25e8b45eb0d1100cd565ec5b797adf67141e01d835cde671e687f5515cb6eab69bb465e9c7d004131634609266c2e1b69b0adbf43  bottle-0.12.21.tar.gz
"
